package com.msf.frametest.components;

import javax.swing.*;

public class ModalDialog extends JDialog {

    public ModalDialog(JFrame parent) {
        super(parent, "ModalDialog", true);
        try {
            getContentPane().add(new JLabel("Modal Dialog"));

            setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
            setLocationRelativeTo(parent);
            setSize(300, 400);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}
